<%@ page language="java" import="java.util.*,com.king.cms.common.PowerParameter" pageEncoding="UTF-8"%>
<%@ include file="/hotel/include/css.jsp"%>
<%-- /*包含css样式表*/ --%>
<%  
	String pageFunc = "终端设置";		//功能描述
%>
<% 
	int pow=(PowerParameter.save | PowerParameter.cls | PowerParameter.list);
	Map m = (Map)request.getAttribute("data");
	if(null == m)
	  m = new HashMap();
%>


<html>
	<head>
		<title><%=pageFunc%>
		</title>
		<script language="JavaScript" src="<%=path%>/js/generalcheck.js"></script> 
		<script language="javascript">
	function doEnable()
	{
		form1.bmMc.disabled=false;
		form1.bmBzrs.disabled=false;
	}
	function ki_save(){
      var flag = true;
	  if(clskg(document.getElementById("areaName").value) == '') {
	 	   alert('终端分区名称不能为空');
	 	   flag = false;
	 	   return;
	  }
	   
	  if(clskg(document.getElementById("isSingle").value) == '') {
	 	   alert('分区是否只有一个终端');
	 	   flag = false;
	 	   return;
	  }
	   
	 if(flag){
	    form1.action='<%=path%>/clientarea.do?action=save';
	    form1.submit();
	    }
	}
	function ki_cls(){  
	   document.form1.areaName.value='';
	   document.form1.imageFile.value='';
	    document.form1.isSingle.value='';
	}
	function ki_list(){
		window.open('<%=basePath%>clientarea.do?action=list','_self');
	}
	////////除去空格/////////
	function clskg(va){
	  var th=/\s/g;
	 va=va.replace(th,'');
	 return va;
	}
	function uploadfile(){
        openwindow('<%=path%>/hotel/client/upload.jsp','500','300','_blank');
 }
</script>
	</head>
	<body background="<%=imgpath%>top3.gif" leftmargin="0" topmargin="0">
		<p><br>  
		<center>
		<form name="form1" method="post"
			action="<%=basePath%>client.do?action=save">
			 
			<table height="48" border="0" cellpadding="2" cellspacing="1"
				class="bg_table" style="width:90%" bordercolor="#111111">
				<tr class="top_td">
					<td colspan="4"  >
						终端设备分区
					</td>
				</tr>
				<tr class="td2">
					<td width="20%">
						终端设备分区名称
					</td>
					<td width="80%" colspan="3">
					    <input type="hidden" name="areaId" value="<%=m.get("ID") %>" >
						<input type="text" name=areaName style="width:97%" value="<%=m.get("CLIENT_AREA_NAME")==null?"":m.get("CLIENT_AREA_NAME")%>" class="area100"  check="c_n_50">
					</td>  
					 
				</tr> 
				<tr class="td2">
					<td width="20%">
						分区背景图片
					</td>
					<td width="30%" > 
					<input type="hidden" name=saveName   value="<%=m.get("IMAGE_SAVE_PATH")==null?"":m.get("IMAGE_SAVE_PATH")%>" class="area100"  check="c_n_50">
						<input type="text" name=imageFile size="40" style="width:73%" value="<%=m.get("IMAGE_NAME")==null?"":m.get("IMAGE_NAME")%>" class="area100"  check="c_n_50" readonly>
						<label> <input type="button" name="choiceupload" class="area100" value="选择"   onClick="uploadfile()"> </label>
					</td> 
					<td width="20%">
						是否唯一
					</td>
					<td width="30%">
						  <select name="isSingle">
						                 <option value='' <%if(m.get("IS_SINGLE")==null){out.print("selected");}%>>是否只有单一屏幕</option>
						                 <option value=0 <%if(m.get("IS_SINGLE")==null||(m.get("IS_SINGLE")+"").equals("0")){out.print("selected");}%>>否</option>
						                 <option value=1 <%if(m.get("IS_SINGLE")!=null&&(m.get("IS_SINGLE")+"").equals("1")){out.print("selected");}%>>是</option>
						                 
						                 </select>
					</td>
				</tr> 
				<tr class="top_td">
					<td colspan="4"> 
					</td>
				</tr>
			</table>
</form>
</center>
		</body>
</html>
<%@ include file="/hotel/pow.jsp"%>
